package heliotrope.res
{
	import flash.display.Graphics;

	public class ResourcePool
	{
		private static var instance:ResourcePool;
		
		private var _graphics:GraphicsPool;
		private var _audio:AudioPool;
		private var _data:DataPool;
		
		private var _setting:XML;
		public function ResourcePool(pvt:PrivateClass, setting_:XML)
		{
			_setting = setting_;
			_graphics = new GraphicsPool(new XML);
		}
		
		public function get graphics():GraphicsPool
		{
			return _graphics;
		}

		public static function init(setting_:XML):void
		{
			if(ResourcePool.instance) throw new DefinitionError("You can't init the ResourcePool twice!");
			ResourcePool.instance = new ResourcePool(new PrivateClass, setting_);
		}
		
		public static function getInstance():ResourcePool
		{
			return ResourcePool.instance;
		}
	}
}

class PrivateClass
{
	public function PrivateClass()
	{
	}
}